home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / Java2 / src / javax / swing / SwingConstants.java < prev    next >
Encoding:
Java Source  |  1999-05-28  |  3.7 KB  |  116 lines  |  [TEXT/CWIE]

  1. /*
  2.  * @(#)SwingConstants.java    1.9 98/08/26
  3.  *
  4.  * Copyright 1997, 1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14. package javax.swing;
  15.  
  16.  
  17. /**
  18.  * A collection of constants generally used for positioning and orienting
  19.  * components on the screen.
  20.  *
  21.  * @version 1.9 08/26/98
  22.  * @author Jeff Dinkins
  23.  * @author Ralph Kar (orientation support)
  24.  */
  25. public interface SwingConstants {
  26.  
  27.         /** 
  28.          * The central position in an area. Used for
  29.          * both compass-direction constants (NORTH, etc.)
  30.          * and box-orientation constants (TOP, etc.).
  31.          */
  32.         public static final int CENTER  = 0;
  33.  
  34.         // 
  35.         // Box-orientation constant used to specify locations in a box.
  36.         //
  37.         /** 
  38.          * Box-orientation constant used to specify the top of a box.
  39.          */
  40.         public static final int TOP     = 1;
  41.         /** 
  42.          * Box-orientation constant used to specify the left side of a box.
  43.          */
  44.         public static final int LEFT    = 2;
  45.         /** 
  46.          * Box-orientation constant used to specify the bottom of a box.
  47.          */
  48.         public static final int BOTTOM  = 3;
  49.         /** 
  50.          * Box-orientation constant used to specify the right side of a box.
  51.          */
  52.         public static final int RIGHT   = 4;
  53.  
  54.         // 
  55.         // Compass-direction constants used to specify a position.
  56.         //
  57.         /** 
  58.          * Compass-direction North (up).
  59.          */
  60.         public static final int NORTH      = 1;
  61.         /** 
  62.          * Compass-direction north-east (upper right).
  63.          */
  64.         public static final int NORTH_EAST = 2;
  65.         /** 
  66.          * Compass-direction east (right).
  67.          */
  68.         public static final int EAST       = 3;
  69.         /** 
  70.          * Compass-direction south-east (lower right).
  71.          */
  72.         public static final int SOUTH_EAST = 4;
  73.         /** 
  74.          * Compass-direction south (down).
  75.          */
  76.         public static final int SOUTH      = 5;
  77.         /** 
  78.          * Compass-direction south-west (lower left).
  79.          */
  80.         public static final int SOUTH_WEST = 6;
  81.         /** 
  82.          * Compass-direction west (left).
  83.          */
  84.         public static final int WEST       = 7;
  85.         /** 
  86.          * Compass-direction north west (upper left).
  87.          */
  88.         public static final int NORTH_WEST = 8;
  89.  
  90.         //
  91.         // These constants specify a horizontal or 
  92.         // vertical orientation. For example, they are
  93.         // used by scrollbars and sliders.
  94.         //
  95.         /** Horizontal orientation. Used for scrollbars and sliders. */
  96.         public static final int HORIZONTAL = 0;
  97.         /** Vertical orientation. Used for scrollbars and sliders. */
  98.         public static final int VERTICAL   = 1; 
  99.  
  100.         //
  101.         // Constants for orientation support, since some languages are
  102.         // left-to-right oriented and some are right-to-left oriented.
  103.         // This orientation is currently used by buttons and labels.
  104.         //
  105.         /**
  106.          * Identifies the leading edge of text for use with left-to-right
  107.          * and right-to-left languages. Used by buttons and labels.
  108.          */
  109.         public static final int LEADING  = 10;
  110.         /**
  111.          * Identifies the trailing edge of text for use with left-to-right
  112.          * and right-to-left languages. Used by buttons and labels.
  113.          */
  114.         public static final int TRAILING = 11;
  115. }
  116.